package router

import (
	jwt "gitee.com/sansaniot/ssiot-core/httpmvc/jwtauth"
	"github.com/gin-gonic/gin"
	"ssadmin/internal/admin/apis"
)

func init() {
	AuthRouters = append(AuthRouters, registerUserLogoRouter)
}

// registerUserLogoRouter
func registerUserLogoRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	logoApi := apis.SysLogo{}
	sysApi := apis.Sys{}

	r := v1.Group("/api/sys").Use(authMiddleware.MiddlewareFuncWithOutValidate())
	{
		r.GET("/logo/get", logoApi.Get)
		r.POST("/logo/save", logoApi.Save)
		r.GET("/goto/get", sysApi.GetGoto)
		r.POST("/goto/save", sysApi.SaveGoto)
		r.GET("/port/detect", sysApi.PortDetect)
		r.GET("/data-keep/get", sysApi.GetDataKeep)
		r.POST("/data-keep/save", sysApi.SaveDataKeep)
		r.GET("/file-clean/get", sysApi.GetFileClean)
		r.POST("/file-clean/save", sysApi.SaveFileClean)
		r.POST("/data/sync", sysApi.SysDataSync)
	}
}
